import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      children:[
        {
          path: '/user',
          component: () => import('../views/User.vue'),
        },
        {
          path: '/role',
          component: () => import('../views/RoleList.vue'),
        },
        {
          path: '/menu',
          component: () => import('../views/Menu.vue'),
        },
        {
          path: '/permission',
          component: () => import('../views/Permissions.vue'),
        },
        {
          path: '/approval',
          component: () => import('../views/Approval.vue'),
        },
         {
          path: '/report',
          component: () => import('../views/Report.vue'),
        },
        {
          path: '/Inventory',
          component: () => import('../views/ProductWork/InventoryQuery.vue'),
        },
        {
          path: '/InventoryFB',
          component: () => import('../views/ProductWork/InventoryDistribution.vue'),
        },
        {
          path: '/inout',
          component: () => import('../views/ProductWork/InOutFlow.vue'),
        },
        {
          path: '/InventoryAlert',
          component: () => import('../views/ProductWork/InventoryAlert.vue'),
        },
        {
          path: '/batchquery',
          component: () => import('../views/ProductWork/BatchQuery.vue'),
        },
        {
          path: '/batchflow',
          component: () => import('../views/ProductWork/BathFlow.vue'),
        },
        {
          path: '/shelfinquiry',
          component: () => import('../views/ProductWork/ShelfInquiry.vue'),
        },
        {
          path: '/productAdd',
          component: () => import('../views/ProductWork/ProductAdd.vue'),
        },
        {
          path: '/outboundPrediction',
          component: () => import('../views/ProductWork/OutboundPrediction.vue'),
        },
        {
          path: '/dashboard',
          component: () => import('../views/ProductWork/Dashboard.vue'),
        },
        {
          path: '/realtimeDashboard',
          component: () => import('../views/ProductWork/RealtimeDashboard.vue'),
        },
      ]
    },
    {
      path: '/about',
      component: () => import('../views/AboutView.vue'),
    },
     {
      path: '/login',
      component: () => import('../views/Login.vue'),
    },
    
  ],
})

export default router
